package com.acmen.ump.adminapi.constant;

import lombok.Getter;

/**
 * @author Acmen
 * @ClassName MenuLevel.java
 * @Description 菜单级别枚举
 * @CreateTime 2019年09月01日 14:30:42
 */
@Getter
public enum EnumMenuLevel {
    /**
     * 一级菜单
     */
    MENU_LEVEL_FIRST(1),
    /**
     * 二级菜单
     */
    MENU_LEVEL_SECOND(2),
    /**
     * 按钮
     */
    MENU_LEVEL_BUTTON(3);

    private int code;

    EnumMenuLevel(int code){
        this.code = code;
    }

    public boolean match(int code){
        return this.getCode() == code;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
